package com.witmore.neutron.ai.mcp.server.other;//package com.witmore.neutron.ai.cognitive.tool.time;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Slf4j
@Component
public class DateTimeServer {


    @Tool(description = "获取当前时间")
    public String getCurrentTime() {
        log.info("[CurrentTimeService] getCurrentTime");
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
    }
}
